import request from '@/config/axios'

// 服务对象 VO
export interface Service_objectVO {
  id: number // 主键
  customerId: number // 客户编号
  customerName: string // 客户名称
  nurseId: number // 护工编号
  nurseName: string // 护工名称
}

// 服务对象 API
export const Service_objectApi = {
  // 查询服务对象分页
  getService_objectPage: async (params: any) => {
    return await request.get({ url: `/yyzx/service_object/page`, params })
  },

  // 查询服务对象详情
  getService_object: async (id: number) => {
    return await request.get({ url: `/yyzx/service_object/get?id=` + id })
  },

  // 新增服务对象
  createService_object: async (data: Service_objectVO) => {
    return await request.post({ url: `/yyzx/service_object/create`, data })
  },

  // 修改服务对象
  updateService_object: async (data: Service_objectVO) => {
    return await request.put({ url: `/yyzx/service_object/update`, data })
  },

  // 删除服务对象
  deleteService_object: async (id: number) => {
    return await request.delete({ url: `/yyzx/service_object/delete?id=` + id })
  },

  // 导出服务对象 Excel
  exportService_object: async (params) => {
    return await request.download({ url: `/yyzx/service_object/export-excel`, params })
  },
}